<template>
    <div>
        <h1>Second组件</h1>
        <div>{{fromBrotherMsg}}</div>
    </div>
</template>

<script>
import pubsub from 'pubsub-js'
export default {
    data(){
        return{
            fromBrotherMsg:''
        }
    },
    created(){
       pubsub.subscribe('gileskey',(arg1,arg2)=>{
          this.fromBrotherMsg=arg2
       })
    }
}
</script>

<style>

</style>